package com.neusoft.bean;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

//@Component
//@Scope("prototype")
public class Singer implements Perform{
    @Value("${application.performer.age}")
    private String age;

    @Resource
    private Songs my_songs;

    public Singer() {
        System.out.println("singer init");
    }

    @Override
    public void perform() {
//        this.age++;
        StringBuilder stringBuilder = new StringBuilder();
        for(String song : my_songs.getSongs()){
            stringBuilder.append(song+" ");
        }
        System.out.println("sing ......... "+stringBuilder.toString());
    }
}
